﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QuanLyBanHang.Lib;

namespace QuanLyBanHang.Report
{
    public partial class crsKhachHang : Form
    {
        private DataTable tbl = new DataTable();
        public crsKhachHang(DataTable _dtb)
        {
            InitializeComponent();
            tbl = _dtb;
        }

        private void crsKhachHang_Load(object sender, EventArgs e)
        {
            DataTable dtb = new DataTable();
            try
            {
                crsbcKhachHang rpKhachHang = new crsbcKhachHang();
                dtb = KetNoi.GetTable("select * from tblKhachHang");
                rpKhachHang.SetDataSource(tbl);
                crystalReportViewer1.ReportSource = rpKhachHang;
                crystalReportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
        }
    }
}
